From b30e6a53d660f9ccbc0ded640c2a1dc5df673ff2 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 2 Sep 2024 16:43:25 +0700
Subject: <iman> update fetch data

---
 src/pages/shop/promo/[slug].jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/pages/shop/promo/[slug].jsx')

diff --git a/src/pages/shop/promo/[slug].jsx b/src/pages/shop/promo/[slug].jsx
index 544286f9..ce73ebd1 100644
--- a/src/pages/shop/promo/[slug].jsx
+++ b/src/pages/shop/promo/[slug].jsx
@@ -24,7 +24,7 @@ import whatsappUrl from '../../../core/utils/whatsappUrl.js';
 import { cons, toQuery } from 'lodash-contrib';
 import _ from 'lodash';
 import useActive from '../../../core/hooks/useActive.js';
-import useProductSearch from '../../../lib/product/hooks/useProductSearch.js';
+import useProductSearch from '../../../lib/promo/hooks/usePromotionSearch.js';
 
 const BasicLayout = dynamic(() => import('../../../core/components/layouts/BasicLayout.jsx'))
 
@@ -45,7 +45,7 @@ export default function PromoDetail() {
   const popup = useActive();
   const prefixUrl = `/shop/promo/${slug}`
   const [queryFinal, setQueryFinal] = useState({});
-  const [limit, setLimit] = useState<number>(30);
+  const [limit, setLimit] = useState(30);
   const [q, setQ] = useState('*');
   const [finalQuery, setFinalQuery] = useState({fq: `type_value_s:${slug}`});
   const [products, setProducts] = useState(null);
@@ -365,7 +365,7 @@ export default function PromoDetail() {
               ) : promoData && promoItems.length >= 1 ? (
                 <>
                 <div className='grid grid-cols-1 gap-x-1 gap-y-1'>
-                  {visiblePromotions?.map((promotion) => (
+                  {products?.map((promotion) => (
                     <div key={promotion.id} className="min-w-36 max-w-[400px] mb-[20px] sm:w-full md:w-1/2 lg:w-1/3 xl:w-1/4 ">
                       <ProductPromoCard promotion={promotion}/>
                     </div>
-- 
cgit v1.2.3

